<%-- 
    Document   : search
    Created on : 17.10.2010, 16:07:44
    Author     : nico
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="u" uri="http://nixis.de/jsp/tags/core" %>

<html>
    <head>
        <title>Search results</title>
        <style type="text/css">
            @import url('<u:url value="/style/todo.css" />');
        </style>
    </head>
    <body>
        <h1>Search results for ${it.query}</h1>
        <c:choose>
            <c:when test="${fn:length(it.results) > 0}">
                <ul>
                    <c:forEach var="item" items="${it.results}">
                        <li><a href="<u:url value="/article/${item.sluggedId}" />">${item.title}</a></li>
                    </c:forEach>
                </ul>
            </c:when>
            <c:otherwise>
                Your search did not yield any results
            </c:otherwise>
        </c:choose>
    </body>
</html>